using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CATEGORIES
{
    class IncomeCategory
    {
        private List<string> _incomeItems;
        private int _size;

        //default constructor
        public IncomeCategory()
        {
            _incomeItems = new List<string>();
            _incomeItems.Add("FullTime");
            _incomeItems.Add("PartTime");
            _incomeItems.Add("ReturnedLoan");
            _incomeItems.Add("Family");
            _incomeItems.Add("Others");

            _size = 5;
        }

        public void Add(string itemName)
        {
            _incomeItems.Add(itemName);
            _size++;
        }

        public bool Delete(string itemName)
        {
            if (_incomeItems.Remove(itemName))
            {
                _size--;
                return true;
            }
            
            return false;
        }

        //getters
        public int Size
        {
            get { return _size; }
        }

        public List<string> Items //getting item by index
        {
            get { return _incomeItems; }
        }
    }
}
